<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>
<rich:panel header="#{messages['select.deposit.installment.schema']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
	
		<h:outputText></h:outputText>
		<t:message for="installment" styleClass="error"></t:message>
		
		<h:panelGroup>
		  	<h:outputText value="*" styleClass="standardText_Mandatory" /> 
			<h:outputText value="#{messages['downpayment.installment.schema']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:selectOneMenu id="installment" styleClass="standardText" value="#{adminProspectPaymentBean.downPaymentId}" required="true">
			<f:selectItem itemLabel="#{messages['please.select']}"
					itemValue="" /> 
			<f:selectItems value="#{adminProspectPaymentBean.downPaymentSelectList}"/>
			<a4j:support ajaxSingle="true" event="onclick" reRender="detail"></a4j:support>
		</t:selectOneMenu>
		
	</t:panelGrid>
	
	<t:panelGrid id="detail" columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText value="#{messages['deposit']}" styleClass="standardText_Label" />
		<h:outputText id="deposit" value="#{adminProspectPaymentBean.deposit}" styleClass="standardText">
			<f:convertNumber pattern="#,###,###,##0.00"/>
		</h:outputText>
		
		<h:outputText value="#{messages['monthly.payment']}" styleClass="standardText_Label" />
		<h:outputText value="#{adminProspectPaymentBean.deMonthPay}" styleClass="standardText">
			<f:convertNumber pattern="#,###,###,##0.00"/>
		</h:outputText>
		
		<h:outputText value="#{messages['months']}" styleClass="standardText_Label" />
		<h:outputText id="month" value="#{adminProspectPaymentBean.deMonth}" styleClass="standardText">
		</h:outputText>
	
	</t:panelGrid>
	
	<t:panelGrid  columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<h:panelGroup>
			<h:commandButton styleClass="button" value="#{messages['select']}" action="#{adminProspectPaymentBean.navSelectInstallmentSch}" immediate="true"/>
		</h:panelGroup>
	</t:panelGrid>
</rich:panel>
